<%@page import="model.Usuario"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
     <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
     <%@ page language="java" errorPage="/html/erro.jsp" %>
<%
String path=request.getContextPath();
%>
     
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>

<link href="/sga/css/botao.css" rel="stylesheet" type="text/css" />
<link href="/sga/css/style.css" rel="stylesheet" type="text/css" />
<link href="/sga/css/menu.css"  rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="/sga/js/jquery.js"></script>
	<script type="text/javascript" src="/sga/js/menu.js"></script>
	<script type="text/javascript" src="/sga/js/funcoes.js"></script>

</head>


<body onload="DataHora();">


<div id="tudo">
  <div id="logo"></div>
  
 <c:import url="menu.jsp" />
 
  <div class="conteudo">
  

<c:if test="${mensagem!=null }">
 <p style="color: red;text-align: center;">${mensagem }</p>
 <%session.removeAttribute("mensagem"); %>
 </c:if>
   
 <c:if test="${validade==null }">
  <c:if test="${mensagem==null }">
 <p style="color:red;text-align: center;">Confirme seus dados.</p>
 </c:if>
 
 
 
<form action="/sga/Servlet" method="post">
    <input type="hidden" name="acao" value="validar"/> 
	<input type="hidden" name="classe" value="UsuarioControl"/>
<!-- 	<input type="hidden" name="acao" value="UsuarioControl.validar"/> -->
	<input type="hidden" name="destino" value="/html/alterarusuario.jsp"/>
	


<table id="table-login" align="center">

<tr> 

<td>LOGIN</td>
<td> <input type="text" name="login" class="edit"/></td>

</tr><tr>

<td>SENHA</td>
<td><input type="password" name="senha" class="edit" /></td>
</tr><tr>
<td></td>
<td ><input type="submit" value="Confirmar" class="botao-confirmar" />

</td>
</tr>
</table>

 
</form>

 
 </c:if> 
 
  
<c:if test="${validade!=null }"> 
<form action="<%=path%>/Servlet" method="post" onsubmit="return validaNovoUsuario(this);">
 <input type="hidden" name="classe" value="UsuarioControl"/>
 <input type="hidden" name="acao" value="alterar"/>
<!--  <input type="hidden" name="acao" value="UsuarioControl.alterar"/> -->
 <input type="hidden" name="destino" value="/html/perfil.jsp"/>
	
 
 

 
<table id="table-login" align="center">
<tr>

<td>Nome</td>
<td> <input type="text" name="nome" class="edit" value="${session_usuario.nome }"/></td>

</tr><tr>

<td>Email</td>
<td> <input type="text" name="email" class="edit" value="${session_usuario.email }"/></td>
</tr><tr>

<td>Telefone1</td>
<td> <input type="text" name="telefone1" class="edit" maxlength="9" onkeypress="return isNumber(this);" value="${session_usuario.telefone1 }"/></td>

</tr><tr>


<td>Telefone2</td>
<td> <input type="text" name="telefone2" class="edit" maxlength="9" onkeypress="return isNumber(this);" value="${session_usuario.telefone2 }"/></td>

</tr><tr>


<td>Senha</td>
<td> <input type="text" name="senha" class="edit" /></td>

</tr><tr>


<td>Login</td>
<td> <input type="text" name="login" class="edit" value="${session_usuario.login }"/></td>

</tr> 
</table>
<p style="text-align: center;">
<input type="submit" value="Salvar" class="botao-salvar" />
<input type="button" value="Cancelar" class="botao-cancelar" onclick="history.back();"/>
 </p>
</form>




</c:if>













  </div>
  
	<c:import url="rodape.jsp"></c:import>
</div>
</body>
</html>
